Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: get logout page working again #50

Merged
merged 2 commits into from
Dec 1, 2023
Merged

fix: get logout page working again #50

merged 2 commits into from
Dec 1, 2023

Conversation

travis
Copy link
Member

@travis travis commented Nov 30, 2023

This will work once storacha/w3ui#595 is released.

Copy link
Contributor

github-actions bot commented Nov 30, 2023

Website preview 🔗✨

build log

@travis travis changed the title wip: get logout page working again fix: get logout page working again Nov 30, 2023
@travis travis marked this pull request as ready for review November 30, 2023 21:54
@travis travis requested review from alanshaw and gobengo November 30, 2023 22:05
import { useRouter } from "next/navigation"
import { useEffect } from "react"

export default function LogoutPage () {
//const [, { unloadAgent }] = useW3()
const [, { logout }] = useW3()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not a client method? I assume we'd want this in w3cli also?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

implementing logout in the client would probably help simplify this method:

https://github.com/web3-storage/w3ui/blob/main/packages/react/src/providers/Provider.tsx#L76

but I think we'd still need something at this level because we need to clear the client, space, and accounts state

Copy link
Member Author

@travis travis Nov 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could probably use the same event trick to clear space and accounts, but afaict Client isn't really meant to be mutable, and the creating a new private key is something that happens during Client creation, so we really do need something that can throw away the old client and create a new one, which I don't think can happen inside a Client method

@travis travis requested a review from alanshaw November 30, 2023 22:44
@travis travis merged commit eb2a3aa into main Dec 1, 2023
5 of 6 checks passed
@travis travis deleted the feat/logout branch December 1, 2023 19:34
travis pushed a commit that referenced this pull request Dec 1, 2023
🤖 I have created a release *beep* *boop*
---


##
[1.1.0](w3console-v1.0.0...w3console-v1.1.0)
(2023-12-01)


### Features

* extract usePlan and use it to chill our plan/get game
([#51](#51))
([51c51aa](51c51aa))


### Bug Fixes

* get logout page working again
([#50](#50))
([eb2a3aa](eb2a3aa))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants